/*
 * Decompiled with CFR 0.146.
 * 
 * Could not load the following classes:
 *  net.minecraft.util.ResourceLocation
 *  net.minecraftforge.client.model.IModelCustom
 *  net.minecraftforge.client.model.IModelCustomLoader
 */
package mogiksaop.qliphoth.client.models.smd;

import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ICustomModelLoader;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelLoaderRegistry;

public class ValveStudioModelLoader implements ICustomModelLoader {
	public static final ValveStudioModelLoader instance = new ValveStudioModelLoader();

	public ValveStudioModelLoader() {
		ModelLoaderRegistry.registerLoader(this);
	}

	@Override
	public void onResourceManagerReload(IResourceManager resourceManager) {
	}
	
	public boolean accepts(ResourceLocation modelLocation) {
		return modelLocation.getPath().endsWith(".pqc");
	}

	public IModel loadModel(ResourceLocation modelLocation, boolean overrideSmoothShading) {
		try {
			return new ValveStudioModel(modelLocation, overrideSmoothShading);
		} catch (GabeNewellException e) {
			e.printStackTrace();

			return null;
		}
	}

	public IModel loadModel(ResourceLocation modelLocation) {
		try {
			return new ValveStudioModel(modelLocation);
		} catch (GabeNewellException e) {
			e.printStackTrace();

			return null;
		}
	}
}